from XTestRunner import HTMLTestRunner
import unittest
from Tools import send_email,log_set
if __name__ == '__main__':
    log_set()
    unit=unittest.defaultTestLoader.discover(start_dir='',pattern='TestCase.py')
    with open('baogao.html','wb') as f:
        runner=HTMLTestRunner(stream=f,title="测试报告",rerun=1,language='zh-CN')
        runner.run(unit)
    send_email()